-
Notifications
You must be signed in to change notification settings - Fork 0
Fix/issue 13 spinner builder #125
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Go 1.20+ automatically seeds the global random source, making explicit rand.Seed() calls unnecessary and deprecated. Removed the redundant seeding in demoMatrix().
strings.Title is deprecated due to not handling Unicode properly. Use cases.Title from golang.org/x/text for correct title casing. Added golang.org/x/text v0.33.0 dependency.
Go 1.21+ has built-in min() and max() generic functions. Remove the redundant custom implementations.
The isActiveSafe() method was only used in tests and exposed internal implementation details. Refactored test to use behavioral verification (checking no output is produced) instead of checking internal state.
Changed writeString to return (int, error) to properly handle the io.WriteString return values. Callers explicitly ignore errors using blank identifiers, making the intentional error handling clear. This improves code transparency without changing behavior.
Add Go Reference badge linking to the official Go documentation on pkg.go.dev for better API discoverability.
Add usage example for the Matrix component, demonstrating how to create multi-row layouts for concurrent task progress. Updated table of contents to include Matrix section.
Add project overview, key components table, build commands, testing conventions, and code style guidelines for AI coding assistants. Force added because GEMINI.md is ignored by global git settings.
…trings-title', 'fix/issue-4-builtin-minmax', 'fix/issue-5-remove-isactivesafe', 'fix/issue-6-cursor-error-handling', 'fix/issue-7-godoc-badge', 'fix/issue-8-matrix-example', 'fix/issue-9-gemini-md' and 'fix/issue-10-progressbar-isdone-test' into fix/issue-11-table-driven-tests
Refactored title-related and error-handling tests to use table-driven patterns for better maintainability. Switched to test.RandomString() from gommons for consistency with other tests. Removed duplicate test case.
Added a stress test to verify Matrix thread safety under concurrent row updates. Also synchronized test helper usage by switching to test.RandomString() across affected test files.
Introduced SpinnerBuilder to provide a more flexible and readable way to configure Spinner instances. Updated tests to verify the builder.
Pull Request Test Coverage Report for Build 21081908100Details
💛 - Coveralls |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.